org.eclipse.vtp.framework.engine.runtime
Class Executable

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.runtime.Component
      extended by org.eclipse.vtp.framework.engine.runtime.Configurable
          extended by org.eclipse.vtp.framework.engine.runtime.Executable
Direct Known Subclasses:
Action, Observer

public abstract class Executable
extends Configurable

Executable.

Author:
Lonnie Pryor

Field Summary
 
Fields inherited from class org.eclipse.vtp.framework.engine.runtime.Component
blueprint, constructors, mutators
 
Constructor Summary
Executable(Blueprint blueprint, java.lang.Class type, org.w3c.dom.Element[] elements, java.lang.String instanceID)
          Creates a new Executable.
 
Method Summary
protected  java.lang.Object createInstance(Sequence sequence)
          Creates a new instance of the executable component.
protected  IContext createServiceRegistry(Scope scope)
          Creates a service registry for the specified scope.
abstract  Executable execute(Sequence sequence)
          Creates and executes an instance of this executable.
abstract  Action getActionInstance()
          Returns the ID of the action instance that owns this executable.
abstract  int getActionState()
          Returns the action state this executable runs in.
 java.lang.String getInstanceID()
          Returns the ID of this instance of the executable.
abstract  boolean isBlocking()
          Returns true if this execution is blocking.
 
Methods inherited from class org.eclipse.vtp.framework.engine.runtime.Configurable
createBuilder, lookupAllConfigurations, lookupConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Executable

public Executable(Blueprint blueprint,
                  java.lang.Class type,
                  org.w3c.dom.Element[] elements,
                  java.lang.String instanceID)
           throws java.lang.NullPointerException
Creates a new Executable.

Parameters:
blueprint - The blueprint of the process.
type - The type of the executable component.
elements - The configuration data or null for no configuration data.
instanceID - The ID of this instance of the executable.
Throws:
java.lang.NullPointerException - If the supplied blueprint is null.
java.lang.NullPointerException - If the supplied type is null.
java.lang.NullPointerException - If the supplied instance ID is null.
Method Detail

getInstanceID

public java.lang.String getInstanceID()
Returns the ID of this instance of the executable.

Returns:
The ID of this instance of the executable.

getActionInstance

public abstract Action getActionInstance()
Returns the ID of the action instance that owns this executable.

Returns:
The ID of the action instance that owns this executable.

getActionState

public abstract int getActionState()
Returns the action state this executable runs in.

Returns:
The action state this executable runs in.

isBlocking

public abstract boolean isBlocking()
Returns true if this execution is blocking.

Returns:
True if this execution is blocking.

execute

public abstract Executable execute(Sequence sequence)
Creates and executes an instance of this executable.

Parameters:
sequence - The sequence to create under.
Returns:
The next executable in the process or null if the process is over.

createServiceRegistry

protected IContext createServiceRegistry(Scope scope)
Description copied from class: Configurable
Creates a service registry for the specified scope.

Specified by:
createServiceRegistry in class Configurable
Parameters:
scope - The scope to create the registry for.
Returns:
A new service registry for the specified scope.

createInstance

protected java.lang.Object createInstance(Sequence sequence)
                                   throws java.lang.NullPointerException
Creates a new instance of the executable component.

Parameters:
sequence - The sequence that owns the component.
Returns:
A new instance of the executable component.
Throws:
java.lang.NullPointerException - If the supplied sequence is null.